package cn.kgc.controller;

import cn.kgc.common.ResultEntity;
import cn.kgc.pojo.Hauth;
import cn.kgc.service.HauthService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author shkstart
 * @create 2020-03-31 22:31
 */
@Controller
public class HauthController {

    @Resource
    HauthService hauthService;
    //查询所有
    @ResponseBody
    @RequestMapping("/assign/get/all/auth")
    public ResultEntity<List<Hauth>> getAllAuth() {
        List<Hauth> allAuth = hauthService.getAllAuth();
        return ResultEntity.successWithoutData(allAuth);
    }

}
